/**
 * 
 */
package it.unical.canonaco.rende.igpe.game.cbv.logiclayer.engine.actions;

import it.unical.canonaco.rende.igpe.game.cbv.logiclayer.engine.GUIDStorage;

import java.awt.Point;

import org.json.simple.JSONObject;


/**
 * @author Massimo Canonaco
 *
 */
public class ActionCoordinateInfo extends GenericActionInfo 
{

//	private ChessboardPointCoordinate point;
	private Point point;
	
	static public final float GUID = GUIDStorage.ACTION_COORDINATE_INFO;
	
	public ActionCoordinateInfo(int row, int column)
	{
		super();
//		point = new ChessboardPointCoordinate(row, column);
		point = new Point(row, column);
	}
	/* (non-Javadoc)
	 * @see it.unical.canonaco.rende.igpe.game.cbv.logiclayer.engine.events.GenericEvent#getGUID()
	 */
	@Override
	public float getGUID() {
		return GUID;
	}

	/* (non-Javadoc)
	 * @see it.unical.canonaco.rende.igpe.game.cbv.logiclayer.engine.events.GenericEvent#getName()
	 */
	@Override
	public String getName() {
		return "actioncoordinateinfo"+point.x+" "+point.y;
	}

	/**
	 * @return the point
	 */
	public ChessboardPointCoordinate getPoint() {
		return new ChessboardPointCoordinate(point.x, point.y);
	}
//
//	/**
//	 * @param point the point to set
//	 */
//	void setPoint(ChessboardPointCoordinate point) {
//		this.point = point;
//	}
	
	/**
	 * @return the point
	 */
	public Point getSimplePoint() {
		return point;
	}

	/**
	 * @param point the point to set
	 */
	void setPoint(Point point) {
		this.point = point;
	}
	/** */
	public void setRow(int row)
	{
		point.x = row;
	}
	
	/** */
	public void setColumn(int column)
	{
		point.y = column;
	}
	
	/** */
	public void setPoint(int row, int column)
	{
		point.x = row;
		point.y = column;
	}
	@Override
	public JSONObject getAsJSONObject() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public void setFromJSONOnbject(JSONObject object) {
		// TODO Auto-generated method stub
		
	}
}
